package com.workerhelping.enums;

import lombok.Getter;

@Getter
public enum StuckReasonEnum {
    ISERIOUSLYILL(1, "本人重病"),
    IUNEMPLOYMENT(2, "本人失业"),
    FSERIOUSLYILL(3, "家人重病"),
    NATURALDISASTER(4, "自然灾害"),
    SCHOOL(5, "子女上学"),
    ;
    private final Integer id;
    private final String reason;

    StuckReasonEnum(Integer id, String reason) {
        this.id = id;
        this.reason = reason;
    }

    public static String getStuckReasonName(Integer id) {
        if (id == 1)
            return ISERIOUSLYILL.reason;
        else if (id == 2)
            return IUNEMPLOYMENT.reason;
        else if (id == 3)
            return FSERIOUSLYILL.reason;
        else if (id == 4)
            return NATURALDISASTER.reason;
        else if (id == 5)
            return SCHOOL.reason;
        else return null;
    }
}
